/* 
 * single number
 * Given an array of integers, every element appears twice except for one. Find that single one.
 */

#include "../../func.h"

int singleNumber1(vector<int> &nums)
{
    int x = 0;
    for (auto i : nums)
    {
        x ^= i;
    }
    return x;
}